Skip to content

Conversation

arkaitzgarro
Copy link
Owner

@arkaitzgarro arkaitzgarro commented Nov 7, 2022

Our implementation to get the transaction name for Scheduled Tasks, was expecting only commands, but it should also accepts closures, invokable objects and jobs. I took the implementation that Laravel uses to print the scheduled name in the terminal.

The linter was complaining, sorry for the extra diff.

Closes #171

} catch (ClientException $exception) {
Log::error($exception, ['api_response' => (string) $exception->getResponse()->getBody()]);
} catch (Throwable $t) {
} catch (\Throwable $t) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looked better before -- is this why the linter complained? Very, very weird.

Copy link
Owner Author

@arkaitzgarro arkaitzgarro Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we were a few versions behind and looks like they changed the default a couple of weeks ago.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They didn't much of an explanation after I followed the thread to this comment. Must be a Symfony thing.

@arkaitzgarro arkaitzgarro merged commit 1f39a5b into master Nov 7, 2022
@arkaitzgarro arkaitzgarro deleted the fix/schedule-task-name branch November 7, 2022 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AG\ElasticApmLaravel\Collectors\EventDataCollector::shouldIgnoreTransaction(): Argument #1 ($transaction_name) must be of type string,

2 participants